﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _010_011_012操作符详解_10_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Student stu = new Student(null);
            Console.WriteLine(stu.Name);
        }
    }

    class Student
    {
        public Student(string initName)
        {
            //校验空值
            if (string.IsNullOrEmpty(initName))
            {
                this.Name = initName;
            }
            else 
            {
                throw new ArgumentException("initName cannnot be null or empty");
            }
        }
        public string Name;
    }
}
